<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/3/30 0030
 * Time: 下午 5:58
 */
// elseif 和 else if 完全同效果，elseif 是 PHP 为 else if 专门做到容错版。更准确更严格到写法为后者: else if
$t=date("H");
if ($t<"10")
{
    echo "Have a good morning!";
}
elseif ($t<"20")
{
    echo "Have a good day!";
}
else
{
    echo "Have a good night!";
}